Optimal. Leaf size=62 \[ \frac {\text {ArcTan}(\sinh (e+f x)) \cosh (e+f x)}{2 f \sqrt {a \cosh ^2(e+f x)}}-\frac {\tanh (e+f x)}{2 f \sqrt {a \cosh ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {3255, 3286,
2691, 3855} \begin {gather*} \frac {\cosh (e+f x) \text {ArcTan}(\sinh (e+f x))}{2 f \sqrt {a \cosh ^2(e+f x)}}-\frac {\tanh (e+f x)}{2 f \sqrt {a \cosh ^2(e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2691
Rule 3255
Rule 3286
Rule 3855
Rubi steps
\begin {align*} \int \frac {\tanh ^2(e+f x)}{\sqrt {a+a \sinh ^2(e+f x)}} \, dx &=\int \frac {\tanh ^2(e+f x)}{\sqrt {a \cosh ^2(e+f x)}} \, dx\\ &=\frac {\cosh (e+f x) \int \text {sech}(e+f x) \tanh ^2(e+f x) \, dx}{\sqrt {a \cosh ^2(e+f x)}}\\ &=-\frac {\tanh (e+f x)}{2 f \sqrt {a \cosh ^2(e+f x)}}+\frac {\cosh (e+f x) \int \text {sech}(e+f x) \, dx}{2 \sqrt {a \cosh ^2(e+f x)}}\\ &=\frac {\tan ^{-1}(\sinh (e+f x)) \cosh (e+f x)}{2 f \sqrt {a \cosh ^2(e+f x)}}-\frac {\tanh (e+f x)}{2 f \sqrt {a \cosh ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 44, normalized size = 0.71 \begin {gather*} \frac {\text {ArcTan}(\sinh (e+f x)) \cosh (e+f x)-\tanh (e+f x)}{2 f \sqrt {a \cosh ^2(e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.32, size = 51, normalized size = 0.82
method | result | size |
default | \(\frac {\frac {\arctan \left (\sinh \left (f x +e \right )\right ) \left (\cosh ^{2}\left (f x +e \right )\right )}{2}-\frac {\sinh \left (f x +e \right )}{2}}{\cosh \left (f x +e \right ) \sqrt {a \left (\cosh ^{2}\left (f x +e \right )\right )}\, f}\) | \(51\) |
risch | \(-\frac {{\mathrm e}^{2 f x +2 e}-1}{\sqrt {\left ({\mathrm e}^{2 f x +2 e}+1\right )^{2} a \,{\mathrm e}^{-2 f x -2 e}}\, \left ({\mathrm e}^{2 f x +2 e}+1\right ) f}+\frac {i \ln \left ({\mathrm e}^{f x}+i {\mathrm e}^{-e}\right ) \left ({\mathrm e}^{2 f x +2 e}+1\right ) {\mathrm e}^{-f x -e}}{2 f \sqrt {\left ({\mathrm e}^{2 f x +2 e}+1\right )^{2} a \,{\mathrm e}^{-2 f x -2 e}}}-\frac {i \ln \left ({\mathrm e}^{f x}-i {\mathrm e}^{-e}\right ) \left ({\mathrm e}^{2 f x +2 e}+1\right ) {\mathrm e}^{-f x -e}}{2 f \sqrt {\left ({\mathrm e}^{2 f x +2 e}+1\right )^{2} a \,{\mathrm e}^{-2 f x -2 e}}}\) | \(187\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 231 vs.
\(2 (59) = 118\).
time = 0.51, size = 231, normalized size = 3.73 \begin {gather*} \frac {\frac {\arctan \left (e^{\left (-f x - e\right )}\right )}{\sqrt {a}} - \frac {e^{\left (-f x - e\right )} - e^{\left (-3 \, f x - 3 \, e\right )}}{2 \, \sqrt {a} e^{\left (-2 \, f x - 2 \, e\right )} + \sqrt {a} e^{\left (-4 \, f x - 4 \, e\right )} + \sqrt {a}}}{2 \, f} - \frac {3 \, \arctan \left (e^{\left (-f x - e\right )}\right )}{2 \, \sqrt {a} f} - \frac {5 \, e^{\left (-f x - e\right )} + 3 \, e^{\left (-3 \, f x - 3 \, e\right )}}{4 \, {\left (2 \, \sqrt {a} e^{\left (-2 \, f x - 2 \, e\right )} + \sqrt {a} e^{\left (-4 \, f x - 4 \, e\right )} + \sqrt {a}\right )} f} + \frac {3 \, e^{\left (-f x - e\right )} + 5 \, e^{\left (-3 \, f x - 3 \, e\right )}}{4 \, {\left (2 \, \sqrt {a} e^{\left (-2 \, f x - 2 \, e\right )} + \sqrt {a} e^{\left (-4 \, f x - 4 \, e\right )} + \sqrt {a}\right )} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 504 vs.
\(2 (54) = 108\).
time = 0.44, size = 504, normalized size = 8.13 \begin {gather*} -\frac {{\left (3 \, \cosh \left (f x + e\right ) e^{\left (f x + e\right )} \sinh \left (f x + e\right )^{2} + e^{\left (f x + e\right )} \sinh \left (f x + e\right )^{3} + {\left (3 \, \cosh \left (f x + e\right )^{2} - 1\right )} e^{\left (f x + e\right )} \sinh \left (f x + e\right ) - {\left (4 \, \cosh \left (f x + e\right ) e^{\left (f x + e\right )} \sinh \left (f x + e\right )^{3} + e^{\left (f x + e\right )} \sinh \left (f x + e\right )^{4} + 2 \, {\left (3 \, \cosh \left (f x + e\right )^{2} + 1\right )} e^{\left (f x + e\right )} \sinh \left (f x + e\right )^{2} + 4 \, {\left (\cosh \left (f x + e\right )^{3} + \cosh \left (f x + e\right )\right )} e^{\left (f x + e\right )} \sinh \left (f x + e\right ) + {\left (\cosh \left (f x + e\right )^{4} + 2 \, \cosh \left (f x + e\right )^{2} + 1\right )} e^{\left (f x + e\right )}\right )} \arctan \left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right )\right ) + {\left (\cosh \left (f x + e\right )^{3} - \cosh \left (f x + e\right )\right )} e^{\left (f x + e\right )}\right )} \sqrt {a e^{\left (4 \, f x + 4 \, e\right )} + 2 \, a e^{\left (2 \, f x + 2 \, e\right )} + a} e^{\left (-f x - e\right )}}{a f \cosh \left (f x + e\right )^{4} + {\left (a f e^{\left (2 \, f x + 2 \, e\right )} + a f\right )} \sinh \left (f x + e\right )^{4} + 2 \, a f \cosh \left (f x + e\right )^{2} + 4 \, {\left (a f \cosh \left (f x + e\right ) e^{\left (2 \, f x + 2 \, e\right )} + a f \cosh \left (f x + e\right )\right )} \sinh \left (f x + e\right )^{3} + 2 \, {\left (3 \, a f \cosh \left (f x + e\right )^{2} + a f + {\left (3 \, a f \cosh \left (f x + e\right )^{2} + a f\right )} e^{\left (2 \, f x + 2 \, e\right )}\right )} \sinh \left (f x + e\right )^{2} + a f + {\left (a f \cosh \left (f x + e\right )^{4} + 2 \, a f \cosh \left (f x + e\right )^{2} + a f\right )} e^{\left (2 \, f x + 2 \, e\right )} + 4 \, {\left (a f \cosh \left (f x + e\right )^{3} + a f \cosh \left (f x + e\right ) + {\left (a f \cosh \left (f x + e\right )^{3} + a f \cosh \left (f x + e\right )\right )} e^{\left (2 \, f x + 2 \, e\right )}\right )} \sinh \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\tanh ^{2}{\left (e + f x \right )}}{\sqrt {a \left (\sinh ^{2}{\left (e + f x \right )} + 1\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {{\mathrm {tanh}\left (e+f\,x\right )}^2}{\sqrt {a\,{\mathrm {sinh}\left (e+f\,x\right )}^2+a}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________